package com.yzi.utilitys
{
	import flash.geom.Matrix;
	import flash.geom.Point;
	import flash.geom.Rectangle;

	public class GeometryUtility
	{
		public function GeometryUtility()
		{
			throw new Error("Static Class.");
		}
		
		static public function GetRectByMetrix($rect:Rectangle, $matrix:Matrix): Rectangle
		{
			var result:Rectangle = new Rectangle();
			
			result.topLeft = $matrix.transformPoint($rect.topLeft);
			result.bottomRight = $matrix.transformPoint($rect.bottomRight);
			
			return result;
		}
		
		static public function Polar($distans:Number, $radian:Number): Point
		{
			var result:Point = new Point();
			result.x = Math.cos($radian) * $distans;
			result.y = Math.sin($radian) * $distans;
			
			return result;
		}
	}
}